home *** CD-ROM | disk | FTP | other *** search
- ;
- ; REBOOT.ASM
- ;
- ; (c) 1990,1991 Adrian J.King
- ;
- ; This code was developed for inclusion in the book
- ; "Running LANtastic", by Adrian King, published by
- ; Bantam Books, October 1991.
- ;
- ; This module contains the assembler routine used
- ; to reboot the machine.
- ;
- ; Called as reboot(COLDBOOT) for a cold boot, and
- ; reboot(WARMBOOT) for a warm boot.
- ;
- ; You reboot by moving either 1234h (warm) or 0h (cold)
- ; to location 040:072 (the boot code is passed in as the
- ; only parameter to the routine.) Then you jump to
- ; location 0ffff:0.
- ;
- ;$Header: C:/USR/LANBOOK/SRC2/LAN/VCS/REBOOT.ASV 1.1 22 Sep 1991 8:23:28 $
- ;
- ;$Log: C:/USR/LANBOOK/SRC2/LAN/VCS/REBOOT.ASV $
- ;
- ; Rev 1.1 22 Sep 1991 8:23:28
- ;Moved entercrit() and leavecrit() into nosif.asm.
- ;Cosmetic touch ups.
- ;
- ; Rev 1.0 13 Jul 1991 11:21:40
- ;Initial revision.
- ;
-
- .model small,C
-
- .code
-
- PUBLIC reboot
-
- reboot PROC FAR
-
- bootflag equ [bp+6] ; Location of parameter
-
- push bp ; Standard C prologue
- mov bp, sp
- mov ax, 040h ; Point to reboot word in ES:BX
- mov es, ax
- mov bx, 072h
-
- boot:
- mov ax, bootflag ; Store boot flag
- mov es:[bx], ax
- mov ax,0ffffh ; Set up address
- push ax
- xor ax,ax
- push ax
- ret ; Return to FFFF:0
-
- hlt ; Should never get here
-
- reboot ENDP
-
- END
-